import Vue from 'vue'
import Router from 'vue-router'

import Index from '../page/Index.vue';

const Details = (r)=> { require.ensure( [] , ()=> r( require('@/page/Details.vue')), "Details" )};

/*const Information = (r)=> { require.ensure( [] , ()=> r( require('@/page/Information.vue')), "Information" )};
const Zhibo = (r)=> { require.ensure( [] , ()=> r( require('@/components/Information/Zhibo.vue')), "Zhibo" )};
const Message = (r)=> { require.ensure( [] , ()=> r( require('@/components/Information/Message.vue')), "Message" )};
const ExchangePerformance = (r)=> { require.ensure( [] , ()=> r( require('@/components/Information/ExchangePerformance.vue')), "ExchangePerformance" )};
const AnalystColumn = (r)=> { require.ensure( [] , ()=> r( require('@/components/Information/AnalystColumn.vue')), "AnalystColumn" )};
const NetFriends = (r)=> { require.ensure( [] , ()=> r( require('@/components/Information/NetFriends.vue')), "NetFriends" )};


const Profile = (r)=> { require.ensure( [] , ()=> r( require('@/page/Profile.vue')), "Profile" )};
const ProfileIntroduction = (r)=> { require.ensure( [] , ()=> r( require('@/components/Profile/Introduction.vue')), "ProfileIntroduction" )};
const EnterpriseCulture = (r)=> { require.ensure( [] , ()=> r( require('@/components/Profile/EnterpriseCulture.vue')), "EnterpriseCulture" )};
const Honor = (r)=> { require.ensure( [] , ()=> r( require('@/components/Profile/Honor.vue')), "Honor" )};
const Invite = (r)=> { require.ensure( [] , ()=> r( require('@/components/Profile/Invite.vue')), "Invite" )};


const TradingGoods = (r)=> { require.ensure( [] , ()=> r( require('@/page/TradingGoods.vue')), "TradingGoods" )};


const GoodsReceivePay = (r)=> { require.ensure( [] , ()=> r( require('@/page/GoodsReceivePay.vue')), "GoodsReceivePay" )};
const DeliveryType = (r)=> { require.ensure( [] , ()=> r( require('@/components/GoodsReceivePay/DeliveryType.vue')), "DeliveryType" )};
const Warehouse = (r)=> { require.ensure( [] , ()=> r( require('@/components/GoodsReceivePay/Warehouse.vue')), "Warehouse" )};
const TestingOrganization = (r)=> { require.ensure( [] , ()=> r( require('@/components/GoodsReceivePay/TestingOrganization.vue')), "TestingOrganization" )};
const Inventory = (r)=> { require.ensure( [] , ()=> r( require('@/components/GoodsReceivePay/Inventory.vue')), "Inventory" )};


const Instructions = (r)=> { require.ensure( [] , ()=> r( require('@/page/Instructions.vue')), "Instructions" )};
const DownLoad = (r)=> { require.ensure( [] , ()=> r( require('@/components/Instructions/DownLoad.vue')), "DownLoad" )};
const NewGuide = (r)=> { require.ensure( [] , ()=> r( require('@/components/Instructions/NewGuide.vue')), "NewGuide" )};
const TradeGuide = (r)=> { require.ensure( [] , ()=> r( require('@/components/Instructions/TradeGuide.vue')), "TradeGuide" )};
const Hint = (r)=> { require.ensure( [] , ()=> r( require('@/components/Instructions/Hint.vue')), "Hint" )};


const Law = (r)=> { require.ensure( [] , ()=> r( require('@/page/Law.vue')), "Law" )};
const TradeLaw = (r)=> { require.ensure( [] , ()=> r( require('@/components/Law/Trade.vue')), "Trade" )};
const Legislation = (r)=> { require.ensure( [] , ()=> r( require('@/components/Law/Legislation.vue')), "Legislation" )};

const BusinessCooperation = (r)=> { require.ensure( [] , ()=> r( require('@/page/BusinessCooperation.vue')), "BusinessCooperation" )};
const Organization = (r)=> { require.ensure( [] , ()=> r( require('@/components/Cooperation/Organization.vue')), "Organization" )};
const Step = (r)=> { require.ensure( [] , ()=> r( require('@/components/Cooperation/Step.vue')), "Step" )};*/

const Contact = (r)=> { require.ensure( [] , ()=> r( require('@/page/Contact.vue')), "Contact" )};
const ContactMsg = (r)=> { require.ensure( [] , ()=> r( require('@/components/Contact/Msg.vue')), "ContactMsg" )};
const Idea = (r)=> { require.ensure( [] , ()=> r( require('@/components/Contact/Idea.vue')), "Idea" )};
const Service = (r)=> { require.ensure( [] , ()=> r( require('@/components/Contact/Service.vue')), "Service" )};


Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            name: 'index',
            component: Index,
            redirect : '/index'
        },
        {//
            path: '/index',
            name: 'index',
            component: Index
        },
        {//
            path: '/details/:type',
            name: 'details',
            component: Details,
            query:{type:0},
        },
       /* {//资讯中心
            path: '/information',
            name: 'information',
            component: Information,
            redirect:'/information/zhibo',
            children : [
                {path:'/information/zhibo',name:'zhibo',component:Zhibo},//直播
                {path:'/information/message',name:'message',component:Message},//交易所公告
                {path:'/information/exchangeperformance',name:'exchangeperformance',component:ExchangePerformance},//交易所动态
                {path:'/information/analystcolumn',name:'analystcolumn',component:AnalystColumn},//分析师专栏
                {path:'/information/netfriends',name:'netfriends',component:NetFriends},//网友会动态
            ]
        },
        {//公司简介
            path: '/profile',
            name: 'profile',
            component: Profile,
            redirect:'/profile/introduction',
            children:[
                {path:'/profile/introduction',name:'profileintroduction',component:ProfileIntroduction},
                {path:'/profile/culture',name:'enterpriseculture',component:EnterpriseCulture},
                {path:'/profile/honor',name:'honor',component:Honor},
                {path:'/profile/invite',name:'invite',component:Invite},
            ]
        },
        {//交易商品
            path: '/tradinggoods',
            name: 'tradinggoods',
            component: TradingGoods,
        },
        {//商品收交
            path: '/goodsreceivepay',
            name: 'goodsreceivepay',
            component: GoodsReceivePay,
            redirect : '/goodsreceivepay/deliverytype',
            children:[
                {path:'/goodsreceivepay/deliverytype',name:'DeliveryType',component:DeliveryType},//交收方式
                {path:'/goodsreceivepay/warehouse',name:'Warehouse',component:Warehouse},//仓库
                {path:'/goodsreceivepay/testingorganization',name:'TestingOrganization',component:TestingOrganization},//检测机构
                {path:'/goodsreceivepay/inventory',name:'Inventory',component:Inventory},//库存
            ]
        },
        {//操作指南
            path: '/instructions',
            name: 'instructions',
            component: Instructions,
            redirect : '/instructions/download',
            children:[
                {path:'/instructions/download',name:'DownLoad',component:DownLoad},//下载
                {path:'/instructions/newguide',name:'NewGuide',component:NewGuide},//开户
                {path:'/instructions/tradeguide',name:'TradeGuide',component:TradeGuide},//交易指南
                {path:'/instructions/hint',name:'Hint',component:Hint},//提示
            ]
        },
        {//法律法规
            path: '/law',
            name: 'law',
            component: Law,
            redirect : '/law/trade',
            children:[
                {path:'/law/trade',name:'DownLoad',component:TradeLaw},//
                {path:'/law/legislation',name:'Legislation',component:Legislation},//
            ]
        },
        {//商务合作
            path: '/businesscooperation',
            name: 'businesscooperation',
            component: BusinessCooperation,
            redirect : '/businesscooperation/organization',
            children:[
                {path:'/businesscooperation/organization',name:'Organization',component:Organization},//
                {path:'/businesscooperation/step',name:'Step',component:Step},//
            ]
        },*/
        {//联系我们
            path: '/contact',
            name: 'contact',
            component: Contact,
            redirect : '/contact/msg',
            children:[
                {path:'/contact/msg',name:'ContactMsg',component:ContactMsg},//
                {path:'/contact/idea',name:'Idea',component:Idea},//
                {path:'/contact/service',name:'Service',component:Service},//
            ]
        }
    ]
})
















